﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using V5_Common;
using System.Text;

namespace V5_EShop.Admin
{
    public partial class Admin_Index_Left : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                string menu = Input.SetString(Request["menu"]);
                switch (menu.ToLower())
                {
                    case "product":
                        Bind_Product();
                        break;
                    case "config":
                        Bind_Config();
                        break;
                    case "article":
                        Bind_Article();
                        break;
                    case "user":
                        Bind_Admin_User();
                        break;
                    default:
                        Bind_Product();
                        break;
                }
            }
        }

        private void Bind_Product()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href='admin_menu_product_class.aspx' target='menu'>产品管理</a></li>");
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_ProductClass.aspx"" target=""main"">产品分类</a></li>");
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_ProductComment.aspx"" target=""main"">产品评论管理</a></li>");
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_ProductFieldClass.aspx"" target=""main"">商品属性</a></li>");
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_ProductBrand.aspx"" target=""main"">品牌管理</a></li>");
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_AskAnswer.aspx"" target=""main"">问答管理</a></li>");
            this.menu1.Text = sb.ToString();
        }

        private void Bind_Config()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_Config.aspx"" target=""main"">网站配置</a></li>");
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_TemplateSelect.aspx"" target=""main"">模板模板</a></li>");
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_Announce.aspx"" target=""main"">公告管理</a></li>");
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_Friend.aspx"" target=""main"">友情链接</a></li>");
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_HotKeyWord.aspx"" target=""main"">热门关键字</a></li>");
            this.menu1.Text = sb.ToString();
        }

        private void Bind_Article()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_Article.aspx"" target=""main"">文章列表</a></li>");
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_ArticleClass.aspx"" target=""main"">文章分类管理</a></li>");
            //sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_ArticleComment.aspx"" target=""main"">文章评论管理</a></li>");
            this.menu1.Text = sb.ToString();
        }

        private void Bind_Admin_User()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""User/User_Index.aspx"" target=""main"">会员管理</a></li>");
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""User/User_Level.aspx"" target=""main"">会员等级管理</a></li>");
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_Admin.aspx"" target=""main"">管理员</a></li>");
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_Admin.aspx"" target=""main"">修改密码</a></li>");
            sb.Append(@"<li style=""list-style:none;padding-left:5px;""><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_Logout.aspx"" target=""main"">退出</a></li>");
            this.menu1.Text = sb.ToString();
        }
    }
}
